﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Details.aspx.vb" Inherits="CricketForum.Details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div >
    <h1>
        Player Details
    </h1>
    </div>
    <table>
        <tr>
            <asp:DataList ID="DataList1" runat="server" DataSourceID="PlayerDetails" >
                <HeaderTemplate >
                <H2>
                    Personal Information</H2>
                </HeaderTemplate>
                <ItemTemplate>
                    <table  width="800px">
                        <tr>
                            <td>
                                Player Name:
                            </td>
                            <td>
                                <%# Eval("Name")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                DOB:
                            </td>
                            <td>
                                <%# Eval("DOB","{0:d}")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Nickname:
                            </td>
                            <td>
                                <%# Eval("Nickname")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Nation
                            </td>
                            <td>
                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("Nation") %>'></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                BattingStyle:
                            </td>
                            <td>
                                <%# Eval("BattingStyle")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                BowlingStyle:
                            </td>
                            <td>
                                <%# Eval("BowlingStyle")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Role:
                            </td>
                            <td>
                                <%# Eval("Role")%>
                            </td>
                        </tr>
                         <tr>
                            <td>
                                Team Logo
                            </td>
                            <td>
                                <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("TeamLogo") %>' Width="150px"
                                    Height="150px" ImageAlign="Middle" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                National Flag
                            </td>
                            <td>
                                <asp:Image ID="NationFlag" runat="server" ImageUrl='<%# Eval("NationFlag") %>' Width="300px"
                                    Height="150px" ImageAlign="Middle" />
                            </td>
                        </tr>
                       
                        <tr>
                            <td>
                                PlayerPhoto
                            </td>
                            <td>
                                <asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("PlayerPhoto") %>' Width="300"
                                    Height="400px" ImageAlign="Middle" />
                            </td>
                        </tr>
                </ItemTemplate>
                <FooterStyle />
            </asp:DataList>
        </tr>
    </table>
    <br />
    <div >
    <h1>
          Career statistics in Test,One Day International (ODI), and T20 Cricket
    </h1>
    </div>
    <table>
        <tr>
            <td>
                <asp:DataList ID="DataList3" runat="server" DataSourceID="TestDataSource" HorizontalAlign="Center"
                    RepeatDirection="Horizontal">
                    <HeaderTemplate>
                        Career statistics in&nbsp;&nbsp;&nbsp;&nbsp; : TEST
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td>
                                    Total Matches Played
                                </td>
                                <td>
                                    <%# Eval("TotalMatchesPlayed")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Total Runs Scored
                                </td>
                                <td>
                                    <%# Eval("TotalRunsScored")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Batting Average
                                </td>
                                <td>
                                    <%# Eval("BattingAverage")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    No Of Hundreds
                                </td>
                                <td>
                                    <%# Eval("NoOfHundreds")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    No Of Fifties
                                </td>
                                <td>
                                    <%# Eval("NoOfFifties")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Top Score
                                </td>
                                <td>
                                    <%# Eval("TopScore")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Wickets
                                </td>
                                <td>
                                    <%# Eval("Wickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Balls Bowled
                                </td>
                                <td>
                                    <%# Eval("BallsBowled")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Bowling Average
                                </td>
                                <td>
                                    <%# Eval("BowlingAverage")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Five Wickets
                                </td>
                                <td>
                                    <%# Eval("FiveWickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Ten Wickets
                                </td>
                                <td>
                                    <%# Eval("TenWickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Best Bowling
                                </td>
                                <td>
                                    <%# Eval("BestBowling")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Catches
                                </td>
                                <td>
                                    <%# Eval("Catches")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Stumps
                                </td>
                                <td>
                                    <%# Eval("Stumps")%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
            </td>
            <td>
                <asp:DataList ID="DataList2" runat="server" DataSourceID="ODIDataSource" HorizontalAlign="Center"
                    RepeatDirection="Horizontal">
                    <HeaderTemplate>
                        ODI
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td>
                                    <%# Eval("TotalMatchesPlayed")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("TotalRunsScored")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("BattingAverage")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("NoOfHundreds")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("NoOfFifties")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("TopScore")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("Wickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("BallsBowled")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("BowlingAverage")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("FiveWickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("TenWickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("BestBowling")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("Catches")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("Stumps")%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
            </td>
            <td>
                <asp:DataList ID="DataList4" runat="server" DataSourceID="T20DataSource" HorizontalAlign="Center"
                    RepeatDirection="Horizontal">
                    <HeaderTemplate>
                        T20
                    </HeaderTemplate>
           
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td>
                                    <%# Eval("TotalMatchesPlayed")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("TotalRunsScored")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("BattingAverage")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("NoOfHundreds")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("NoOfFifties")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("TopScore")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("Wickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("BallsBowled")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("BowlingAverage")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("FiveWickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("TenWickets")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("BestBowling")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("Catches")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%# Eval("Stumps")%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="PlayerDetails" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringWorldsCricket %>"
        ProviderName="<%$ ConnectionStrings:ConnStringWorldsCricket.ProviderName %>"
        SelectCommand="SELECT Player.Name, Player.DOB, Player.Nickname, Player.BattingStyle, Player.BowlingStyle, Player.Role, Player.PlayerPhoto, InternationalCricketTeams.NationFlag, InternationalCricketTeams.Nation, Player.ID, InternationalCricketTeams.TeamLogo FROM (InternationalCricketTeams INNER JOIN Player ON InternationalCricketTeams.ID = Player.Nation)
WHERE (Player.ID = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="TestDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringWorldsCricket %>"
        ProviderName="<%$ ConnectionStrings:ConnStringWorldsCricket.ProviderName %>"
        SelectCommand="SELECT CareerStatistics.TotalMatchesPlayed, CareerStatistics.TotalRunsScored, CareerStatistics.BattingAverage, CareerStatistics.NoOfHundreds, CareerStatistics.NoOfFifties, CareerStatistics.TopScore, CareerStatistics.Wickets, CareerStatistics.BallsBowled, CareerStatistics.BowlingAverage, CareerStatistics.FiveWickets, CareerStatistics.TenWickets, CareerStatistics.BestBowling, CareerStatistics.Catches, CareerStatistics.Stumps, Player.ID, MatchType.ID AS Expr1 FROM ((CareerStatistics INNER JOIN MatchType ON CareerStatistics.MatchType = MatchType.ID) INNER JOIN Player ON CareerStatistics.PlayerName = Player.ID) WHERE (Player.ID = ?) AND (MatchType.ID = 1)">
        <SelectParameters>
            <asp:QueryStringParameter Name="?" QueryStringField="ID" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="T20DataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringWorldsCricket %>"
        ProviderName="<%$ ConnectionStrings:ConnStringWorldsCricket.ProviderName %>"
        SelectCommand="SELECT CareerStatistics.TotalMatchesPlayed, CareerStatistics.TotalRunsScored, CareerStatistics.BattingAverage, CareerStatistics.NoOfHundreds, CareerStatistics.NoOfFifties, CareerStatistics.TopScore, CareerStatistics.Wickets, CareerStatistics.BallsBowled, CareerStatistics.BowlingAverage, CareerStatistics.FiveWickets, CareerStatistics.TenWickets, CareerStatistics.BestBowling, CareerStatistics.Catches, CareerStatistics.Stumps, Player.ID, MatchType.ID AS Expr1 FROM ((CareerStatistics INNER JOIN MatchType ON CareerStatistics.MatchType = MatchType.ID) INNER JOIN Player ON CareerStatistics.PlayerName = Player.ID) WHERE (Player.ID = ?) AND (MatchType.ID = 3)">
        <SelectParameters>
            <asp:QueryStringParameter Name="?" QueryStringField="ID" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="ODIDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringWorldsCricket %>"
        ProviderName="<%$ ConnectionStrings:ConnStringWorldsCricket.ProviderName %>"
        SelectCommand="SELECT CareerStatistics.TotalMatchesPlayed, CareerStatistics.TotalRunsScored, CareerStatistics.BattingAverage, CareerStatistics.NoOfHundreds, CareerStatistics.NoOfFifties, CareerStatistics.TopScore, CareerStatistics.Wickets, CareerStatistics.BallsBowled, CareerStatistics.BowlingAverage, CareerStatistics.FiveWickets, CareerStatistics.TenWickets, CareerStatistics.BestBowling, CareerStatistics.Catches, CareerStatistics.Stumps, Player.ID, MatchType.ID AS Expr1 FROM ((CareerStatistics INNER JOIN MatchType ON CareerStatistics.MatchType = MatchType.ID) INNER JOIN Player ON CareerStatistics.PlayerName = Player.ID) WHERE (Player.ID = ?) AND (MatchType.ID = 2)">
        <SelectParameters>
            <asp:QueryStringParameter Name="?" QueryStringField="ID" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
